package com.qf.common.advice;

import com.qf.common.response.Response;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

@ControllerAdvice
public class ExceptionHandle {

    @ExceptionHandler(Exception.class)
    @ResponseBody
    public Response<?> exceptionHandle(Exception e){
        return Response.fail(e.getMessage());
    }

}
